package com.xxs.controller.admin;

import com.xxs.model.Admin;
import com.xxs.service.DictService;
import com.xxs.utils.Pageable;

/**
 * 数据字典
 */
//@Before(AdminInterceptor.class)
public class DictController extends BaseAdminController {
	
	private DictService dictService = enhance(DictService.class);
	
    public void list(){
    	Pageable pageable = getBean(Pageable.class);
    	setAttr("page", dictService.findPage(pageable));
    	setAttr("pageable", pageable);
    	render("/admin/dict/list.ftl");
    }
    public void edit(){
    	Admin bean = Admin.dao.findById(getParaToInt(0));
    	setAttr("bean", bean);
    	render("/admin/dict/edit.ftl");
    }
    public void update(){
    	getModel(Admin.class).myUpdate();
        list();
    }
}
